var $index = $('.num b');
var len = $('.pics img').length;
if (len < 10) {
    len = '0' + len;
}
$('.count').html(len);
var image = new Image();
$(image).load(function () {
    $('.slider').slider({
        contentCls: 'pics',
        hasTriggers:false,
        inEndEffect:'none',
        scrollable: 1,
        sensitivity: 0.1,
        afterEvent: function (status) {
            var index = (status.index + 1);
            if (index < 10) {
                index = '0' + index;
            }
            $index.html(index);
        }
    });
}).attr('src', $('.pics img:eq(0)').attr('src'));
